/**
 * 
 */
package myth.cc.label;

import java.util.LinkedList;
import java.util.List;

import myth.cc.bean.Label;

/**
 * @author Biao Zhang
 *
 */
public class LabelExporter {
	private List<Label> labels = null;
	
	/**
	 * Just initailize the label containers
	 */
	public LabelExporter() {
		labels = new LinkedList<Label>();
	}
	
	/**
	 * Add a label to export
	 * @param label The label
	 */
	public void addLabel(Label label) {
		labels.add(label);
	}
	
	/**
	 * Export all labels' information
	 * One info on one line
	 * @return The formated string
	 */
	public String export() {
		StringBuffer stringBuffer = new StringBuffer();
		for (Label label: labels) {
			stringBuffer.append("********************************");
			stringBuffer.append(label);
		}
		return stringBuffer.toString();
	}
}
